<?php
/**
 * Hidden
 *
 * @author Andres Gutierrez <andres@phalconphp.com>
 * @author Eduar Carvajal <eduar@phalconphp.com>
 * @author Wenzel Pünter <wenzel@phelix.me>
 * @version 1.2.6
 * @package Phalcon
*/
namespace Core\Forms\Element;

use Phalcon\Tag;
use Phalcon\Forms\Exception;
use Core\Forms\Element;

class Hidden extends Element
{
    public function render($attributes = null)
    {
        if (is_array($attributes) === false &&
            is_null($attributes) === false) {
            throw new Exception('Invalid parameter type.');
        }

        return Tag::hiddenField($this->prepareAttributes($attributes));
    }
}
